<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New Vehicle</title>
    <meta name="layout" content="main">
  </head>
  <body>
    <br>
    <g:link class="list" action="newRepairShop">
      <div class="tabNoSelected">
        Repair Shop
      </div>
    </g:link>
  
    <g:link class="list" action="newCustomer">
      <div class="tabNoSelected">
        Customer
      </div>
    </g:link>
  
    <g:link class="list" action="newMechanicalTechnician">
      <div class="tabNoSelected">
        Mechanical Technician
      </div>
    </g:link>
  
    <g:link class="list" action="newVehicle">
      <div class="tabSelected">
        Vehicle
      </div>
    </g:link>
  
    <g:link class="list" action="logout" controller="LogIn">
      <div class="tabNoSelected">Log Out</div>
    </g:link>
  
    <div class="tabContent"> 
      <g:link class="list" action="newVehicle" >
        <div class="tabSelected">
          New
        </div>
      </g:link>
      <g:link class="list" action="listVehicle" >
        <div class="tabNoSelected">
          List
        </div>
      </g:link>
    </div>
    <hr>
    
    <div id="create-vehicle" class="content scaffold-create" role="main">
    <h1>Create Vehicle</h1>
    <g:if test="${flash.message}">
      <div class="message" role="status">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${vehicleInstance}">
      <ul class="errors" role="alert">
        <g:eachError bean="${vehicleInstance}" var="error">
          <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
        </g:eachError>
      </ul>
    </g:hasErrors>
    <g:form action="saveVehicle" >
      <fieldset class="form">
        <g:render template="formVehicle"/>
      </fieldset>
      <fieldset class="buttons">
        <g:submitButton name="create" class="save" value="${message(code: 'Create')}" />
      </fieldset>
    </g:form>
  </div>
  </body>
</html>
